home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 104
/
104.d81
/
tw game
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
7KB
|
185 lines
0 poke53265,27
10 poke56,64:clr:dv=peek(186):ifdv<8thendv=8
20 remopen8,dv,2,"tw.ml2":poke780,.:sys65493:close8
30 open15,dv,15:sys32768+3,"type.high":input#15,e:close15:
40 c(0)=3:c(1)=14:c(2)=6:ife<>0thensys32768+9
50 fori=1to5:hp$(i)="xxx":hs$(i)="00000":next:mk=20550:sysmk-6:poke20551,.
60 hs$(1)="00050":hs$(2)="00040":hs$(3)="00030":hs$(4)="00020":hs$(5)="00010"
70 v=53248:s=54272:pokev+32,.:pokev+33,.:pokev+21,.:vl=s+24:x=rnd(-ti)
80 ad(.)=20735:ad(1)=20732:ad(2)=20729:am=20763:sg=1
90 al=20783:sq=20803:cl=20702:fx=20597
100 rt$="":dn$=""
110 cs$=""+dn$+dn$+rt$+"[146]":sp$=" "
120 fori=.to24:pokes+i,.:next:se=.:wl=.:gosub1200
130 sp(1)=52:sp(2)=58:sp(3)=59:sp(4)=60:sp(5)=60:gosub2000
140 sys36864+9,208
150 ln=19:bg=.:gosub2100:ww=.
160 printtab(5)"[153][208]ress the number (1[153] - 9[153]) of the
162 [153][163]7)"list you want to start with.
165 printtab(12)"[208]ress [198]7[153] to quit."
170 sysfx:pokev+21,.:pokemk,.:pokev+17,27:poke198,.:ti$="000000"
180 geta$:ifa$=""then200
190 goto300
200 ifti$<"000005"then180
210 gosub1100:ti$="000000"
220 geta$:ifa$=""then240
230 goto300
240 ifti$<"000003"then220
250 gosub1140:ti$="000000"
260 geta$:ifa$=""then280
270 goto300
280 ifti$<"000003"then260
290 goto140
300 ifa$="[136]"thensys6*4096+3:gosub1290:goto1280
305 ifa$>="0"anda$<="9"thennf=val(a$)-1
310 gosub1100:ms$=" [211][201][212][213][193][212][201][207][206] [206][207][210][205][193][204]":gosub990:sc=.:fori=.to999:next:bg=1
320 ms$=" [150][210][197][196] [193][204][197][210][212]!":pokev+4,90
330 pokevl,15:pokes+5,224:pokes+6,253:pokes+14,15:pokes+4,33:pokes+18,33
340 form=1to200:pokes+1,peek(s+27)/10+25
350 ifm/10=int(m/10)thengosub1010
360 next:pokes+4,32:ms$="[158][201][206][212][210][213][196][197][210] [193][208][208][210][207][193][195][200][201][206][199]"
370 form=1to100:pokes+1,peek(s+27)/10+25
380 ifm/10=int(m/10)thengosub1010
390 ifpeek(v+4)thenpokev+4,peek(v+4)-1
400 next:pokevl,.
410 poke780,176:sys20720:wl=wl+1:fori=.to999:next:lv=se:iflv>2thenlv=2
420 jj%=peek(v+21):pokev+21,0:gosub1230:pokev+21,jj%
425 print"[158]"n$
430 xx=49152
440 fori=.to9:im$(i)="":fork=.to19
450 im$(i)=im$(i)+chr$(peek(xx+k)):next:xx=xx+20
455 ifleft$(im$(i),4)=" "theni=9
457 next
460 l=tl:m=.:ifl<1thenl=1
470 l2$=str$(l):l2$=right$(l2$,len(l2$)-1):l$=right$("000000"+l2$,6)
475 ifleft$(im$(m),4)=" "then640
480 gosub980:pokemk,3:gosub970:tr=19242+l:nm$="":gosub850:nm$=in$
490 ms$=" [212][210][193][206][211][205][201][212][212][201][206][199]":gosub990:sys36864+3,9,30,22,22,160,1
500 sys36864+3,9,30,23,23,160,5
510 iflen(nm$)<>0andlen(nm$)<15thennl=nl+1:ifnl=3thennl=.:sysam
520 forn=1tolen(nm$):ifmid$(nm$,n,1)<>mid$(im$(m),n,1)then540
530 sysad(lv):goto580
540 gosub1270:ifww<msthensysam:pokev+21,191:gosub1290:pokev+21,159
550 ifww=>ms-5thenpoke20551,1
560 ifww=>ms-3thenpoke20551,2
570 ifww=>ms-1thenpoke20551,3
580 next
590 rem
600 gosub1270:ifww=>msthen660
610 ifpeek(v+2)thenpokev+2,peek(v+2)-2:pokev+3,peek(v+3)-1
620 pokev+43,(peek(v+43)+1)and15:m=m+1:sysal:ifm<10then475
630 x=fre(.):sg=sg+1:poke198,.:ifsg<10then440
640 sg=0:rem se=se+1:ifse>9then660
645 goto410
650 rem end of game
660 sc=((peek(18500)-176)*10000)+((peek(18501)-176)*1000)
670 sc=sc+((peek(18502)-176)*100)+((peek(18503)-176)*10)+(peek(18504)-176)
680 sc$=str$(sc):sc$=right$(sc$,len(sc$)-1):sc$=right$("00000"+sc$,5)
690 ms$="[158] [193][204][201][197][206] [195][207][196][197] [212][200][210][207][213][199][200]":gosub1090:pokev+44,.
700 ms$="[150] [197][193][210][212][200] [201][206] [196][193][206][199][197][210]!":gosub1090:pokev+21,63:gosub1290
710 pokev+37,10:pokev+38,7:pokev+21,100:pokev+45,2:poke19454,52
720 pokevl,15:pokes+5,15:forb=1to5:fora=50to20step-1:pokev+22,a
730 pokes+1,a:pokes,250:pokes+4,129:next:pokes+4,128:poke19454,sp(b):next:
740 pokev+4,255:pokev+16,16:pokev+37,5:pokev+38,13:pokev+22,200
750 pokev+21,44:ms$="[159] [197][193][210][212][200] [201][211] [200][201][211][212][207][210][217]":gosub1090
755 pokev+21,44:ms$="[159] [200]ave a nice day!":gosub1090
760 poke20551,0:fori=peek(v+4)to0step-1:pokev+4,i:next:goto250
770 in$=left$(in$+" ",3)
840 pokemk,.:pokev+32,7:poke198,.:wait198,1:pokev+32,.:pokemk,3:poke198,.:return
850 ti$="000000":in$="":poke198,.:sys36864+15,10,23,"[164]":t2=.
860 getz$:ifz$=""thenz=.:goto890
865 ifz$="[136]"then760
870 ifz$=chr$(133)thentr$=ti$:gosub840:ti$=tr$:goto860
880 z=asc(z$):ifz>95then860
890 ifti$=>l$thensysam:z=13:goto940
900 ifl$="999999"then920
910 ifint(ti/60)=t2thenpoketr,32:tr=tr-1:t2=t2+1
920 zl=len(in$):ifzl>lnthen940
930 ifz>31thenin$=in$+z$:print"[157]"z$"[164]";:goto860
940 ifz=13thenprint"[157] ":return
950 ifz=20andzlthenin$=left$(in$,zl-1):print"[157][157][164] [157]";
960 goto860
970 printcs$sp$cs$;:forx=1tol:print" ";:next:print"[146]":return
980 ms$="[159][201][206][212][197][210][195][197][208][212][201][206][199] [205][197][211][211][193][199][197]":pokemk,2:gosub990:forsp=.to499:next:goto1040
990 printcs$sp$cs$ms$:return
1000 printcs$sp$:return
1010 ifra=2thenra=11:gosub990:goto1030
1020 ra=2:gosub1000
1030 pokev+42,ra:return
1040 poke212,0:pokes+6,240:pokes+5,34:pokevl,15:pokes+4,21
1050 printcs$"";:forj=1to10
1060 pokes+1,rnd(1)*180:pokes,rnd(1)*20
1070 poke214,22:sys58732:printtab(20-j);""left$(im$(m),j);right$(im$(m),j);
1080 poke212,0:print"[145][145]":forsd=1to20:next:next:pokes+4,.:pokevl,.:return
1090 gosub990:forsp=.to1999:next:return
1100 rem draw satellite
1110 poke212,0:print:print"[147]":gosub3000
1120 poke19431,160:syssq:sysfx:syscl:ifbgthenpokev+4,.
1130 pokemk,1:pokev+21,159:sys36864+30,208:return
1140 rem draw high scores
1150 pokev+21,0:print"[147][153]":sys36864+18,1,"[212] [217][160][208][160][197] [160][215] [193] [210] [210][160][201][160][207] [210] [211]"
1160 sys36864+30,208:sys32768,sc,3,14,6:geta$:sc=0
1170 ifa$="1"thenopen1,dv,15,"s0:type.high":sys32768+6,"0:type.high":input#1,a$
1180 close1
1190 return
1200 rem get config
1210 open2,dv,2,"tw config,s,r":input#2,tl,tl,tl,ms:iftl>20thentl=20
1220 close2:return
1230 nf=nf+1:n$=str$(nf)
1240 f$="word list"+n$:open1,dv,15:open8,dv,2,f$:input#1,e,e$
1250 ife=62thenclose8:close1:nf=0:goto1230
1252 ife=0then1260
1254 print"[147][159]"e$:print"[210]eset drive and press a key."
1256 geta$:ifa$=""then1256
1258 run
1260 poke780,.:sys65493:close8:close1:tl=tl-1:iftl<5thentl=5
1265 return
1270 ww=((peek(18491)-176)*10)+(peek(18492)-176):return
1280 pokev+21,.:goto60000
1290 fori=.to9:pokev+44,1:pokev+44,.:next:return
2000 print"[147]":fori=1to150:sys36864+15,rnd(0)*39,rnd(0)*25,"[166]":poke646,c(rnd(0)*3)
2010 next:sys36864+6,208:return
2100 sys36864+3,10,29,2,2,100,1:sys36864+3,10,29,3,5,160,14
2110 sys36864+3,10,29,6,6,99,6:print"[146][154]";:sys36864+18,4,"[172][173][174][175][176][177][178][179]"
2120 print:return
3000 ifjq%thensys36864+9,216:return
3005 print"[147][151][170][171] [158] [204][201][211][212] [151] [158] [205][201][211][212][193][203][197][211] [151] [158] [211][195][207][210][197] [151] [220] [146][168][169]";
3010 print" [151][170][171] [220] 1-0 [151] 00 [151] 00000 [151] [146][168][169] ";
3020 print" [151][170][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][146][169] [152] ";
3030 print"[151] [146][165] [155] [152] [151] [144] [151] [167][151] [146] [152] ";
3040 print" [151] [146][165][155] [155] [152] [151] [144] [151] [167][151] [146]";
3050 print" [152] [151] [152] [151] [146][165][155] [152] [151] [144] [151] ";
3060 print" [167][151] [146] [152] [151] [146][165][155] [152] [151] [144] ";
3070 print" [151] [167][151] [152][146] [155] [151] [146][165][155] [158] ";
3080 print" [158] [151] [167][151] [152][146] [155] [151] [146][165][155] [152] [144] ";
3090 print" [151] [167][151] [152][146] [155] [155] [151] [146][165][155] [152] ";
3100 print" [14